import request from '../utils/request'

// 校对用户注册的账号
export function checkUsername(query: any): any {
  return request({
    url: '/open/checkUsername',
    method: 'get',
    params: query,
  })
}

export function getRoleList(): any {
  return request({
    url: '/open/getRoleList',
    method: 'get' 
  })
}

//获取用户信息
export function getMyInfo(): any {
  return request({
    url: '/user/getMyInfo',
    method: 'get'
  })
}

// 用户登录
export function login(data: any): any {
  return request({
    url: '/open/login',
    method: 'post',
    data,
  })
}

// 注册用户
export function regeister(data: any): any {
  return request({
    url: '/open/regeister',
    method: 'post',
    data,
  })
}
